package cn.newgrand.oa.legal.controller;

import cn.newgrand.oa.legal.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;

@Controller
@RequestMapping("/test")
public class TestController {

    @Autowired
    private TestService testService;

    @RequestMapping("/discount")
    public BigDecimal getDisCountCount(@RequestParam(value = "id") Long id,
                                       @RequestParam(value = "type") Integer type) { //1.表示打折券 2表示減免券
        return testService.disCountSales(id,type);
    }
}
